import App from './App'

import config from './utils/config.js'

// #ifndef VUE3
import Vue from 'vue'
import uView from '@/uni_modules/uview-ui'
import store from '@/store'
import qs from 'qs'

import PublicMethod from '@/utils/publicmethod.js'

Vue.prototype.$public = PublicMethod

Vue.config.productionTip = false
Vue.prototype.$qs = qs
Vue.prototype.$baseURL = config.baseURL

Vue.use(uView)
uni.$u.config.unit = 'rpx'
App.mpType = 'app'
// #ifdef H5
// 打个锚点 本地调试工具
// const vconsole = require('vconsole')
// Vue.prototype.$vconsole = new vconsole() // 使用vconsole
// #endif
const app = new Vue({
	...App,
	store
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
import store from '@/store'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app,
		store
	}
}
// #endif